package com.cskaoyan.controller;

import com.cskaoyan.bean.VO.AdminDashboardVO;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.service.AdminDashboardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 控制面板，仪表盘
 * @author wenkaikai
 * @since 2022/08/15 10:24
 */

@RestController
@RequestMapping("admin")
public class AdminDashboardController {

    @Autowired
    AdminDashboardService adminDashboardService;


    @RequestMapping("dashboard")
    public BaseRespVo dashboard(){
        AdminDashboardVO data = adminDashboardService.queryDashboardParam();
        return BaseRespVo.ok(0, data, "成功");
    }
}